<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
$style = getStyle();
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link href="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/stylesheet.css" rel="stylesheet" type="text/css">
		<link href="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/stylesheet_slide_show.css" rel="stylesheet" type="text/css">
			<link rel="stylesheet" href="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/style.css" type="text/css" media="screen" charset="utf-8">
				<script src="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/SpryTabbedPanels.js" type="text/javascript"></script>
				<script src="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/jquery-1.4.2.min.js" type="text/javascript"></script>
				<script src="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/jquery-flashy-slideshow-1.1.0.js" type="text/javascript"></script>
				<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
				<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/sample.css">
					<script type="text/javascript" src="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/popup-window.js"></script>
					<script>
function doSubmit(){
	if (validateEmail()) {
		document.getElementById("formContainersign").submit();
	}
}
function  validateEmail(){
	var email=document.getElementById("email").value.replace(/(^\s*)|(\s*$)/g, "");
	var existEmail;
	var flag=true;
	var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;
	if(email == ""){
		document.getElementById("emaillabel").innerHTML = "<font color='red'>please input email!</font>";
		return false;
	}else if(!reg.test(email)){
		document.getElementById("emaillabel").innerHTML = "<font color='red'>the style of the email is incorrect!</font>";
		return false;
	}else{
		<?php foreach($query->result() as $row ): ?>
		existEmail="<?=$row->email;?>";
		if (email==existEmail) {
			document.getElementById("emaillabel").innerHTML = "<font color='red'>this email is be used!</font>";
			flag = false;
		}
		<?php endforeach;?>
		if (flag) {
			document.getElementById("emaillabel").style.visibility = "hidden";//不显示
			return flag;
		}else{
			return false;
			}
		
	}
}
</script>

</head>
<body>
	<div class="sample_popup" id="popup" style="display: none; left: 424.5px; position: absolute; top: 268px;">

		<div class="menu_form_header" id="popup_drag">
			<img class="menu_form_exit" id="popup_exit" src="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/form_exit.png" alt="close">
		
		</div>

		<div class="menu_form_body">
			<img src="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/banner.jpg" alt="Popup">
		
		</div>

	</div>


	<div class="main_wrapper_container">
		<div class="inner_page_container_main">
			<div class="header_box_container">
				<div class="logo_box">
					<a href="<?php echo base_url(); ?>"><img src="<?php echo base_url(); ?>uploads/logo.jpg" width="274" height="70" alt="Hair Salon" border="0">
					
					</a>
				</div>
				<div class="left_header_box_main">
					<div class="social_icon_main_box">


						<div class="login_button_signup_button">
							<a href="<?php echo base_url();?>booking/reg"><img src="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/signup_button.jpg" width="84" height="17" border="0" alt="signup_button">
							
							</a>
						</div>
						<div class="login_button_signup_button">
							<a href="<?php echo base_url();?>booking/login"><img src="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/login_button.jpg" width="84" height="17" border="0" alt="login_button">
							
							</a>
						</div>
					</div>
				</div>

			</div>
		</div>

		<link type="text/css" rel="stylesheet" href="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/registration_css.css">
			<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/jquery.ketchup.css">
				<script type="text/javascript" src="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/jquery.min.js"></script>
				<script type="text/javascript" src="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/jquery.ketchup.js"></script>
				<script type="text/javascript" src="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/jquery.ketchup.messages.js"></script>
				<script type="text/javascript" src="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/jquery.ketchup.validations.basic.js"></script>
				<script type="text/javascript">
	$(document).ready(function() {
  $('#formContainersign').ketchup();
});
</script>
				<title>Hair Salon | Registration</title>
				<div class="main_wrapper_container_about_us">
					<div class="inner_page_container_main">
						<div class="signup_container">
							<div class="signup_right">
								<form id="formContainersign" name="signup" method="post" action="<?php echo base_url(); ?>/booking/doReg">
									<div class="right_toppart">
										<div class="rt_bt_top1">
											<div class="rt_tophead">
												<div class="create_account_heading123">
													<img src="<?php echo base_url(); ?>images_booking/<?php echo $style;?>/create_account_heading.jpg" width="330" height="60" alt="register_heading">
												
												</div>
											</div>
											<div class="rt_topmark">
												<span class="rt_please"></span>
											</div>

											<div class="rt_topmark">
												<span class="rt_please">Please Note :</span>&nbsp;&nbsp; <span class="rt_field">Fields marked with <span class="star">*</span> are required.</span>
											</div>
											<div class="form_cont">
												<div class="rowContainer">
													<label>Valid Email Address<span class="star">*</span> </label> <input id="email" name="email" id="validemail" class="txt_rtbox validate(required,email)" type="text" value="" onblur="validateEmail()"><div class="ketchup-error-container" style="left: 664px; top: 302px;">
															<ol></ol>
															<span></span>
														</div> <span class="spanclass" id="emailInfo">Valid E-mail please, you will need it to log in!</span>
														<TH><label id="emaillabel"></label></TH>
												
												</div>
												<div class="rowContainer">
													<label>Confirm Email <span class="star">*</span> </label> <input name="email_confirm" id="email_confirm" class="txt_rtbox validate(required, match(#validemail)" type="text" value=""><div class="ketchup-error-container" style="left: 664px; top: 355px;">
															<ol></ol>
															<span></span>
														</div> <span class="spanclass" id="email_confirmInfo">E-mail Should be same as Original Email Address.</span>
												
												</div>
												<div class="rowContainer">
													<label> Password <span class="star">*</span> </label> <input name="password" id="orgpassword" class="txt_rtbox validate(required,minlength(8))" autocomplete="off" type="password" value=""><div class="ketchup-error-container" style="left: 664px; top: 461px;">
															<ol></ol>
															<span></span>
														</div> <span class="spanclass" id="pass1Info">Passwords must be at least 8 characters.</span>
												
												</div>
												<div class="rowContainer">
													<label> Confirm Password <span class="star">*</span> </label> <input name="cpassword" id="cpassword" class="txt_rtbox validate(required, match(#orgpassword))" type="password"><div class="ketchup-error-container" style="left: 664px; top: 514px;">
															<ol></ol>
															<span></span>
														</div> <span class="spanclass" id="pass2Info">Enter the Same as original password.</span>
												
												</div>
												<div class="rowContainer">
													<label> Name <span class="star">*</span> </label> <input name="name" id="name" class="txt_rtbox validate(required)" autocomplete="off" type="text" value=""><div class="ketchup-error-container" style="left: 664px; top: 408px;">
															<ol></ol>
															<span></span>
														</div> <span class="spanclass" id="nameInfo">Enter Name</span>
												
												</div>
												<div class="rowContainer">
													<label> Phone <span class="star">*</span> </label> <input name="phone" id="phone" class="txt_rtbox validate(required)" autocomplete="off" type="text" value=""><div class="ketchup-error-container" style="left: 664px; top: 408px;">
															<ol></ol>
															<span></span>
														</div> <span class="spanclass" id="nameInfo">Enter Phone</span>
												
												</div>
												<div class="but_sub">
													<input class="buttonbg" name="signup" id="button" value="Signup" type="button" onclick="doSubmit()">
												
												</div>
											</div>
										</div>
									</div>
								</form>
							</div>
						</div>
					</div>
				</div>


				<div class="footer_main_123_box">
					<div class="footer_menu123">
						<div class="footer_right_side_right">© 2011 *****.COM. All Rights Reserved.</div>
					</div>
				</div>
	
	</div>
</body>
</html>
